import 'package:flutter/material.dart';

class GridViewCountCase   extends StatelessWidget{
  const GridViewCountCase({super.key});


  @override
  Widget build(BuildContext context) {
    return GridView.count(
      crossAxisCount: 2,//数量
      mainAxisSpacing: 10,
      crossAxisSpacing: 10,
      childAspectRatio: 2/1,
      children: [
        Container(color: Colors.red,),
        Container(color: Colors.green,),
        Container(color: Colors.blue,),
        Container(color: Colors.yellow),
        Container(color: Colors.purple),
        Container(color: Colors.orange),
        Container(color: Colors.pink),
        Container(color: Colors.brown),
        Container(color: Colors.teal),
        Container(color: Colors.cyan),
        Container(color: Colors.lightBlue),
        Container(color: Colors.lightGreen),
      ],
    
    );
  }

}